<template>
    <div class="option">
        <el-radio-group v-model="radio" size="large">
            <div class="item">
                <img src="../../assets/image_4.jpg" alt="单栏图片">
                <el-radio :value="3" class="op"><div>雕版</div></el-radio>
            </div>
            <div class="item">
                <img src="../../assets/image_5.jpg" alt="单栏图片">
                <el-radio :value="6" class="op"><div>敦煌楷书</div></el-radio>
            </div>
            <div class="item">
                <img src="../../assets/image_6.jpg" alt="单栏图片">
                <el-radio :value="9" class="op"><div>敦煌草书</div></el-radio>
            </div>
        </el-radio-group>
    </div>

</template>

<script setup lang="ts">
import { ref } from 'vue'
const radio = ref(3)
</script>

<style scoped>
.option {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
}

.item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 2vw;
}

.item img {
    object-fit: cover;
    /* 添加此行 */
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    max-height: 400px;
    min-height: 240px;
    height: 20vw;
    max-width: 200px;
    min-width: 120px;
    width: 10vw;
}

.op {
    margin-top: 15px;
}

.op div {
    font-size: clamp(18px, 1.5vw, 28px);
    font-weight: 400;
}

@media (max-width: 400px) {
    .item img {
        object-fit: cover;
        /* 添加此行 */
        background-size: contain;
        background-position: center center;
        background-repeat: no-repeat;
        max-height: none;
        min-height: auto;
        height: 30vw;
        max-width: none;
        min-width: auto;
        width: 15vw;
    }

    .item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin:1vw;
    }

    el-radio div {
        font-size: 5px;
    }
}
</style>